package com.sen.patterns.structural.bridge.ex2;

/**
 * 消息抽象
 * @author sen
 *
 */
public abstract class AbstractMessage {

	MessageImplementor messageImplementor;

	public AbstractMessage(MessageImplementor messageImplementor) {
		this.messageImplementor = messageImplementor;
	}

	public MessageImplementor getMessageImplementor() {
		return messageImplementor;
	}

	public void setMessageImplementor(MessageImplementor messageImplementor) {
		this.messageImplementor = messageImplementor;
	}

	public void sendMessage(String message, String toUser) {
		this.messageImplementor.send(message, toUser);
	}
}
